cmake_minimum_required(VERSION 3.12)
project(ascendc_add_operator)

# 设置CANN路径
set(CANN_PATH "/usr/local/Ascend/ascend-toolkit/latest")

# 包含目录
include_directories(
    ${CANN_PATH}/include
)

# 添加算子编译目标
add_library(add_custom SHARED 
    kernel_impl/add_custom.cpp
)

# 链接库
target_link_libraries(add_custom
    -L${CANN_PATH}/lib64 -lascendcl -lacl_op_compiler
)

# 安装目标
install(TARGETS add_custom DESTINATION lib)